Solve word problems involving trigonometric equations